package com.aurora_manito.xiaomi.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.objects.annotations.Constructor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Aurora_Manito
 * @since 2020-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_cart")
@ApiModel(value="Cart对象", description="")
@NoArgsConstructor                          //无参构造器
@AllArgsConstructor                         //全参造器
public class Cart implements Serializable {

    private static final long serialVersionUID = 1L;

    //这地方不能使用IdType.Auto 2020 6 4
    @TableId(value = "userid", type = IdType.INPUT)
    private Integer userid;

    private Integer buyCount;
    @TableId(value = "goods_id", type = IdType.INPUT)
    private Integer goodsId;

    private Integer subtotal;

    @TableField(exist = false)          // 不让属性名作为数据库字段查询
    private Goods goods;

}
